package com.spzx.payment.api;

import com.spzx.common.core.constant.SecurityConstants;
import com.spzx.common.core.constant.ServiceNameConstants;
import com.spzx.common.core.domain.R;
import com.spzx.payment.api.factory.RemotePaymentInfoFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * ClassName: RemotePaymentInfoService
 * Package: com.spzx.payment.api
 * Description:
 *
 * @Author 梅超凡
 * @Create 2025/1/6 10:56
 * @Version 1.0
 */
@FeignClient(
        contextId = "remotePaymentInfoService",
        value = ServiceNameConstants.PAYMENT_SERVICE,
        fallbackFactory = RemotePaymentInfoFallbackFactory.class
)
public interface RemotePaymentInfoService {
    //远程调用支付服务
    @PostMapping("/savePaymentInfoTradeNo")
    public R<Object> savePaymentInfoTradeNo(
            String tradeNo,
            @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
